#ifndef CWINDBLADEDATA_H
#define CWINDBLADEDATA_H

#include "WBErrDef.h"
#include <QObject>
#include <QtSql>

class CWindBladeData:public QObject
{
    Q_OBJECT
public:
    CWindBladeData();
    ~CWindBladeData();

    WB_ERR_CODE LoadData(QString strFilePath);
    QSqlQueryModel* GetModel();

    QStringList GetTableNames();
    QStringList GetNodeNames();
    QStringList GetTableHeads();
    void SetTableName(QString strTableName);
    void SetNodeName(QString strNodeName);
    QSqlQuery GetColData(QString strColName);

private:
    QSqlDatabase m_objDb;
    QString m_strFilePath;
    QString m_strTableName;
    QString m_strNodeName;
    QSqlQueryModel* m_pModel;
};

#endif // CWINDBLADEDATA_H
